avahi: fix implementation of avahi user
authorJohn Audia <[email protected]>
Tue, 15 Jul 2025 09:00:41 +0000 (05:00 -0400)
committerTed Hess <[email protected]>
Mon, 27 Oct 2025 21:33:06 +0000 (17:33 -0400)
All avahi subpackages should run the daemon as a dedicated user insteead
of as the nobody user. This is helpful in troubleshooting and better for
security and to help avoid resource conflicts.

Build system: x86/64
Build-tested: x86/64-glibc
Run-tested: x86/64-glibc (avahi-dbus-daemon)

Signed-off-by: John Audia <[email protected]>
libs/avahi/Makefile

index 4948dfefb61e2fb4a60d36f143b8702bea423a76..dc1fd247d7f9fdf509d9b61edece9a2a2f499ba5 100644 (file)
@@ -1,6 +1,4 @@
 #
-# Copyright (C) 2007-2016 OpenWrt.org
-#
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
@@ -9,14 +7,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=avahi
 PKG_VERSION:=0.8
-PKG_RELEASE:=9
+PKG_RELEASE:=10
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://github.com/lathiat/avahi/releases/download/v$(PKG_VERSION) \
+PKG_SOURCE_URL:=https://github.com/avahi/avahi/releases/download/v$(PKG_VERSION) \
                https://avahi.org/download
 PKG_HASH:=060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda
 
-PKG_MAINTAINER:=Ted Hess <[email protected]>
+PKG_MAINTAINER:=
 PKG_LICENSE:=LGPL-2.1-or-later
 PKG_LICENSE_FILES:=LICENSE
 PKG_CPE_ID:=cpe:/a:avahi:avahi
@@ -67,6 +65,7 @@ define Package/avahi-autoipd
   SUBMENU:=IP Addresses and Names
   DEPENDS:=+libdaemon
   TITLE:=IPv4LL network address configuration daemon
+  USERID:=avahi=105:avahi=105
 endef
 
 define Package/avahi-autoipd/description
@@ -86,6 +85,7 @@ define Package/avahi-dbus-daemon
   SUBMENU:=IP Addresses and Names
   DEPENDS:=+libavahi-dbus-support +libexpat +librt +libdaemon
   TITLE+= (daemon)
+  USERID:=avahi=105:avahi=105
 endef
 
 define Package/avahi-nodbus-daemon
@@ -153,6 +153,7 @@ define Package/avahi-dnsconfd
   SUBMENU:=IP Addresses and Names
   DEPENDS:=+libavahi +libdaemon +libpthread
   TITLE:=A Unicast DNS server using avahi-daemon
+  USERID:=avahi=105:avahi=105
 endef
 
 define Package/avahi-dnsconfd/description
@@ -270,11 +271,11 @@ CONFIGURE_ARGS += \
        --disable-tests \
        --with-xml=expat \
        --with-distro=none \
-       --with-avahi-user=nobody \
-       --with-avahi-group=nogroup \
-       --with-avahi-priv-access-group=nogroup \
-       --with-autoipd-user=nobody \
-       --with-autoipd-group=nogroup
+       --with-avahi-user=avahi \
+       --with-avahi-group=avahi \
+       --with-avahi-priv-access-group=avahi \
+       --with-autoipd-user=avahi \
+       --with-autoipd-group=avahi
 
 ifeq ($(BUILD_VARIANT),dbus)
 CONFIGURE_ARGS += \